FROM ubuntu:18.04

ADD sources.list /etc/apt/

RUN apt update && apt-get install -y libsasl2-dev python3 python3-pip

RUN pip3 install \
  jupyterlab \
  ipywidgets \
  numpy \
  scipy \
  scikit-learn \
  matplotlib \
  ipython \
  pandas \
  pyhive \
  pyspark \
  thrift \
  sasl \
  thrift_sasl -i https://mirrors.aliyun.com/pypi/simple/

COPY bin/entrypoint.sh /usr/local/bin/
COPY config/ /root/.jupyter/

EXPOSE 8888
VOLUME /notebooks
WORKDIR /notebooks
ENTRYPOINT ["entrypoint.sh"]
